<?php echo $this->Form->create('Tour', array('type' => 'file','class'=>'form-horizontal'));?>
<table class="table table-striped">
        <tr>
            <th>Tiêu đề</th>
            <td>
                <?php echo $this->Form->input('id',array('label'=>' ','value'=>''));?>
                <?php echo $this->Form->input('title',array('label'=>' ','value'=> ''))?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Giá</th>
            <td>
                <?php echo $this->Form->input('price',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Khách Sạn</th>
            <td>
                <?php echo $this->Form->input('hotel_start',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Loại Tour</th>
            <td>
                <?php echo $this->Form->input('tourkindgroups_id',array(
                    'label'=>' ',
                    'value'=>''));
                ?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Ngày khởi hành</th>
            <td>
                <?php echo $this->Form->input('start_date',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Điểm xuất phát</th>
            <td>
                <?php echo $this->Form->input('start_point',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Lịch Trình</th>
            <td>
                <?php echo $this->Form->input('schedule',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Ảnh minh họa</th>
            <td>
<!--                --><?php //echo $this->Form->input('imageURL',array('label'=>' ','value'=>''));?>
                <?php
                echo '<div class="control-group">'.$this->Upload->edit('Temp', "audio", array(
                        'inline'=>1,
                        'image'=>'',)).'</div>';
                echo $this->Form->input('imageURL',array('type'=>'hidden'));
                echo $this->Form->input('Isnew',array('value'=>0, 'type'=>'hidden'));
                ?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Tour Trong Nước ? </th>
            <td>
                <?php echo $this->Form->input('is_national',array(
                    'label'=>'',
                ));?>



            </td>
        </tr>
        <tr>
            <th style="width: 200px">Phương Tiện </th>
            <td>
                <?php echo $this->Form->input('vehicle',array('label'=>' ','value'=>''));?>
            </td>
        </tr>
        <tr>
            <th style="width: 200px">Tour Nổi Bậc ? </th>
            <td>
                <?php echo $this->Form->input('is_hightlight',array(
                    'label'=>'',
                ));?>
            </td>
        </tr>
        <tr>
            <th>Nội dung</th>
            <td>

                <?php echo $this->Html->script('/js/ckeditor/ckeditor.js'); ?>
                <?php echo $this->Form->textarea('content',
                    array(
                        'value'=> '',
                        'class'=>'ckeditor',
                    )); ?>
            </td>
        </tr>
        <tr>
            <th></th>
            <td>
                <?php echo $this->Form->submit(__('Save', true), array('class'=>'btn btn-primary'));?>
                <?php echo $this->Html->link(__('Cancel', true), array(
                    'action'=>'index',),
                    array(
                        'class'=>'btn-primary btn'))?>
            </td>
        </tr>
</table>
<?php echo $this->Form->end();?>
<?php
$webroot = Router::url("/") . "ajax_multi_upload";
$script = "function createUploader(){
    	var live_site = '$this->webroot';
	    var upload1  = new qq.FileUploader({
		element: document.getElementById('AjaxMultiUploadTemp___audio'),
		action: '$webroot/uploads/upload/Temp/',
		debug: true,
                multiple:false,
                validation: {
                        allowedExtensions: ['jpg'],
                        sizeLimit: 2100000
                    },
                onComplete: function(id, fileName, responseJSON){
                        if (responseJSON['success']) {
                	$('#TourImageURL').val(fileName);
                	$('#TourIsnew').val(1);
//                        $('#thumbTemp___audio img').attr('src', live_site+'uploads/sound.png').attr('title','Sound upload');
                        }
                },
	        });
        }
	window.onload = createUploader;";
echo $this->Html->scriptBlock(
    $script,
    array('inline' => false)
);
?>
